Integrand size = 25, antiderivative size = 153 \[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=-\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}} \]
[Out]
Time = 0.32 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3963, 3957, 2952, 2719, 2644, 335, 304, 209, 212, 2651} \[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=-\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}}+\frac {a^2 E\left (\left .\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )\right |2\right )}{d \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}} \]
[In]
[Out]
Rule 209
Rule 212
Rule 304
Rule 335
Rule 2644
Rule 2651
Rule 2719
Rule 2952
Rule 3957
Rule 3963
Rubi steps \begin{align*} \text {integral}& = \frac {\int (a+a \sec (c+d x))^2 \sqrt {\sin (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {\int (-a-a \cos (c+d x))^2 \sec ^2(c+d x) \sqrt {\sin (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {\int \left (a^2 \sqrt {\sin (c+d x)}+2 a^2 \sec (c+d x) \sqrt {\sin (c+d x)}+a^2 \sec ^2(c+d x) \sqrt {\sin (c+d x)}\right ) \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {a^2 \int \sqrt {\sin (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \int \sec ^2(c+d x) \sqrt {\sin (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \int \sec (c+d x) \sqrt {\sin (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {2 a^2 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}}-\frac {a^2 \int \sqrt {\sin (c+d x)} \, dx}{2 \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {\sqrt {x}}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {a^2 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}}+\frac {\left (4 a^2\right ) \text {Subst}\left (\int \frac {x^2}{1-x^4} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = \frac {a^2 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \\ & = -\frac {2 a^2 \arctan \left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {2 a^2 \text {arctanh}\left (\sqrt {\sin (c+d x)}\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {a^2 \tan (c+d x)}{d \sqrt {e \csc (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 18.33 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.88 \[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=-\frac {\left (1+\cos \left (2 \left (\frac {c}{2}+\frac {d x}{2}\right )\right )\right )^2 \cos (c+d x) \left (-1+\csc ^2(c+d x)\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (-\arctan \left (\sqrt {\csc (c+d x)}\right )-\text {arctanh}\left (\sqrt {\csc (c+d x)}\right )-\frac {2 \sqrt {\csc (c+d x)} \sqrt {1-\csc ^2(c+d x)} \operatorname {Hypergeometric2F1}\left (\frac {3}{4},\frac {3}{2},\frac {7}{4},\csc ^2(c+d x)\right )}{3 \sqrt {1-\sin ^2(c+d x)}}+\frac {\sqrt {\csc (c+d x)} \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {3}{2},\frac {3}{4},\csc ^2(c+d x)\right ) \sqrt {1-\sin ^2(c+d x)}}{\sqrt {1-\csc ^2(c+d x)}}\right )}{2 d \left (1+\cos \left (2 \left (\frac {c}{2}+\frac {1}{2} \left (-c+\csc ^{-1}(\csc (c+d x))\right )\right )\right )\right )^2 \csc ^{\frac {3}{2}}(c+d x) \sqrt {e \csc (c+d x)} \sqrt {1-\sin ^2(c+d x)}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 13.83 (sec) , antiderivative size = 996, normalized size of antiderivative = 6.51
method | result | size |
parts | \(\text {Expression too large to display}\) | \(996\) |
default | \(\text {Expression too large to display}\) | \(1290\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.42 (sec) , antiderivative size = 698, normalized size of antiderivative = 4.56 \[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=\left [-\frac {2 \, a^{2} \sqrt {-e} \arctan \left (-\frac {{\left (\cos \left (d x + c\right )^{2} - 6 \, \sin \left (d x + c\right ) - 2\right )} \sqrt {-e} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, {\left (e \sin \left (d x + c\right ) + e\right )}}\right ) \cos \left (d x + c\right ) + a^{2} \sqrt {-e} \cos \left (d x + c\right ) \log \left (\frac {e \cos \left (d x + c\right )^{4} - 72 \, e \cos \left (d x + c\right )^{2} + 8 \, {\left (\cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{2} + {\left (7 \, \cos \left (d x + c\right )^{2} - 8\right )} \sin \left (d x + c\right ) + 8\right )} \sqrt {-e} \sqrt {\frac {e}{\sin \left (d x + c\right )}} + 28 \, {\left (e \cos \left (d x + c\right )^{2} - 2 \, e\right )} \sin \left (d x + c\right ) + 72 \, e}{\cos \left (d x + c\right )^{4} - 8 \, \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) + 8}\right ) - 2 \, a^{2} \sqrt {2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 2 \, a^{2} \sqrt {-2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 4 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, d e \cos \left (d x + c\right )}, \frac {2 \, a^{2} \sqrt {e} \arctan \left (\frac {{\left (\cos \left (d x + c\right )^{2} + 6 \, \sin \left (d x + c\right ) - 2\right )} \sqrt {e} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, {\left (e \sin \left (d x + c\right ) - e\right )}}\right ) \cos \left (d x + c\right ) + a^{2} \sqrt {e} \cos \left (d x + c\right ) \log \left (\frac {e \cos \left (d x + c\right )^{4} - 72 \, e \cos \left (d x + c\right )^{2} + 8 \, {\left (\cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{2} - {\left (7 \, \cos \left (d x + c\right )^{2} - 8\right )} \sin \left (d x + c\right ) + 8\right )} \sqrt {e} \sqrt {\frac {e}{\sin \left (d x + c\right )}} - 28 \, {\left (e \cos \left (d x + c\right )^{2} - 2 \, e\right )} \sin \left (d x + c\right ) + 72 \, e}{\cos \left (d x + c\right )^{4} - 8 \, \cos \left (d x + c\right )^{2} + 4 \, {\left (\cos \left (d x + c\right )^{2} - 2\right )} \sin \left (d x + c\right ) + 8}\right ) + 2 \, a^{2} \sqrt {2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 2 \, a^{2} \sqrt {-2 i \, e} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - 4 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sqrt {\frac {e}{\sin \left (d x + c\right )}}}{4 \, d e \cos \left (d x + c\right )}\right ] \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=a^{2} \left (\int \frac {1}{\sqrt {e \csc {\left (c + d x \right )}}}\, dx + \int \frac {2 \sec {\left (c + d x \right )}}{\sqrt {e \csc {\left (c + d x \right )}}}\, dx + \int \frac {\sec ^{2}{\left (c + d x \right )}}{\sqrt {e \csc {\left (c + d x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\sqrt {e \csc \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\sqrt {e \csc \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+a \sec (c+d x))^2}{\sqrt {e \csc (c+d x)}} \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2}{\sqrt {\frac {e}{\sin \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]